package com.duoduo.selenium.demo;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import com.duoduo.selenium.util.SeleniumUtil;

public class OpenBaidu {

	public static void main(String[] argus) {
		openBaidu();
	}

	public static void openBaidu() {
		SeleniumUtil.setProperties();

		WebDriver driver = new FirefoxDriver();
		driver.get("https://www.baidu.com/");

		driver.findElement(By.xpath("//input[@id='kw']")).sendKeys("selenium java");
		driver.findElement(By.xpath("//input[@id='su']")).click();
		driver.close();
	}
}
